package com.example.film.mapper;

import com.example.film.entity.FilmHot;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface FilmHotMapper {
    //热点资讯table-->filmhot
    //查看热点资讯
    @Select("select title,link,pic1,pic2,pic3,infoDate from filmhot")
    List<FilmHot> findFilmHot();

    //分页查询热点资讯
    @Select("select title,link,pic1,pic2,pic3,infoDate from filmhot LIMIT #{pageSize} OFFSET #{startIndex}")
    List<FilmHot> findFilmHotInfo(@Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);
}
